As electronic data exchange has developed, so to have techniques to gain and defend against unauthorized access to data or electronic systems. For example, encrypted data transfer between different components in an electronic system can be used to prevent unauthorized access to one or more electronic system components.
FIG. 1 illustrates generally an example cryptographic engine 110 including a power management module 111, an inter-integrated circuit (I2C) bus 112, a non-volatile memory (NVM) 113, an NVM interface 114, an NVM control module 115, and a state machine 116. As used herein, engines, modules, and state machines can include hardware (e.g., circuits, etc.), software, firmware, or combinations thereof.
The cryptographic engine 110 can be configured to send or receive encrypted or unencrypted random numbers to or from one or more other electronic components (e.g., one or more other circuits, systems, cryptographic engines, etc.), for example, to authenticate one or more electronic components, to securely transfer data between electronic components, or to otherwise prevent unauthorized access to one or more electronic system components.
FIG. 2 illustrates generally an example master-slave system 100, including a master 101 configured to authenticate a slave 102, such as to reduce the risk of fraud, piracy, or counterfeit prior to communication.
In an example authentication routine, the master 101 can request a first of a plurality manufacturer ID's from one or more slaves (e.g., the slave 102). In response, the slave 102 can send a first manufacturer ID 103 back to the master 101. The master 101 can check the manufacturer ID 103. If the manufacturer ID 103 is revoked, the master 101 can request additional manufacturer IDs from the slave 102. If all manufacturer IDs are revoked, the master 101 can terminate the communication channel. Once a manufacturer ID 103 is confirmed, the master 101 can generate a true random number 104 and send it to the slave 102.
The slave 102 can encrypt the random number 104 using the slave key 105 of the confirmed manufacturer ID 103 and return the encrypted random number to the master 101. The master can derive the slave key 105 using its master key 106 and the confirmed manufacturer ID 103, encrypt the random number 104 sent to the slave 102 using the derived slave key 107, and can compare the encrypted random number to the encrypted random number received from the slave 102. If the encrypted random numbers match, the slave 102 is proven to contain a valid slave key 105 and communication between the master 101 and the slave 102 continue. If the encrypted random numbers do not match, the slave 102 is considered to be invalid and the communication channel can be terminated.
In certain examples, the master 101 can identify the type of slave 102 by, for example, identifying a resistance on an ID pin coupled to an interface (not shown) of the master 101. After identifying the type of slave 102, authentication can proceed to, for example, assure that the slave 102 is not a counterfeit, or has not accessed the master 101 by some type of fraud or piracy. In other examples, the slave 102 can be configured to authenticate the master 101.
However, as technology has developed, even sophisticated encryption techniques have become vulnerable to attack. Power analysis (e.g., simple power analysis (SPA), differential power analysis (DPA), etc.) and electromagnetic (EM) analysis are examples of side-channel attacks that extract cryptographic keys or other secret information from an electronic device (e.g., between components of an integrated circuit, etc.). Power analysis is based on the principle that an electronic circuit or system will consume different amounts of energy depending on the function it is performing. EM analysis is similar to power analysis, though it requires no physical contact with the electronic system. An attack can capture power consumption data during operation of a circuit or system, and such data can be analyzed to identify cryptographic algorithms. Once a cryptographic algorithm is identified, the data can be analyzed to identify one or more encryption keys. Once the attack has identified one or more encryption keys, the circuit or system is no longer secure.
Various techniques have developed to defend against such attacks, such as power line conditioning or filtering, adding noise to system (e.g., altering clock frequencies, etc.), using a constant-weight code, etc. One such countermeasure is disclosed in Frizke, “Obfuscating Against Side-Channel Power Analysis Using Hiding Techniques for AES” (herein, “Frizke”). Frizke requires dual algorithms to process both data and inverse data to balance the varying power consumption on the transistor level when evaluating a “0” or a “1”. However, this countermeasure requires double the area and power consumption of a typical cryptographic system.